Easy, light, flexible tree view made with React.

您所在的位置:网站首页 react treeview Easy, light, flexible tree view made with React.

Easy, light, flexible tree view made with React.

2023-08-16 04:51| 来源: 网络整理| 查看: 265

I noticed that when rendering larger trees with quite a few branches/nodes and quite a few dom elements in each of them, I would often run out of memory very quickly. Even if I started with defaultCollapsed={true}, all the children were still be rendered so it didn't matter.

With this change, collapsed nodes don't render their children at all.

I noticed that in your CSS you simply set height: 0 when the tree is collapsed. That's viable for smaller trees and it avoids an unnecessary rerender when the tree gets uncollapsed, but for very large trees it stops working very quickly.

By very large tree I mean less than 300 nodes which when you think about it, isn't that big at all.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3